package jccr;

public interface DispatcherQueue {

	/**
	 * Enqueues a task for execution.
	 * @param task the task to execute.
	 */
	void enqueue( Task task );
	
	/**
	 * Dequeues the next task for execution.
	 * @return the task to execute.
	 */
	Task dequeue();
	
	/**
	 * Gets the number of enqueued tasks.
	 * @return the number of enqueued tasks.
	 */
	int count();
	
	/**
	 * Sets the monitor for the dispatcher queue.
	 * @param monitor the monitor.
	 */
	void monitor( DispatcherQueueMonitor monitor );
}
